<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
    <link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <style>
        th {
            text-align: center;
        }

        .main-wrap {
            margin-left: 0;
        }
    </style>
</head>
<body>

<!--<div class="container clearfix">-->
<!--    <div class="sidebar-wrap">-->
<!--        <div class="sidebar-title">-->
<!--            <h1>菜单</h1>-->
<!--        </div>-->
<!--        <div class="sidebar-content">-->
<!--            <ul class="sidebar-list">-->
<!--                <li>-->
<!--                    <ul class="sub-menu">-->
<!--                    	<li><a href="/publishtask.html"><i class="icon-font">&#xe012;</i>发布作业</a></li>-->
<!--                    	<li><a href="/not_publish.html"><i class="icon-font">&#xe005;</i>未发布作业</a></li>-->
<!--                    </ul>-->
<!--                </li>-->
<!--            </ul>-->
<!--        </div>-->
<!--    </div>-->
<div class="main-wrap">
    <div class="search-wrap">
        <div class="search-content">
            <form method="post" action="">
<!--                <table class="search-tab">-->
<!--                    <tr>-->
<!--                        <th width="70">关键字:</th>-->
<!--                        <td><input class="common-text" placeholder="标题 关键字" name="keyword" id="text" type="text">-->
<!--                        </td>-->
<!--                        <td>-->
<!--                            <input type="submit" id="search" class="btn btn-primary btn2" value="查询">-->
<!--                        </td>-->
<!--                    </tr>-->
<!--                </table>-->
            </form>
        </div>
    </div>
    <div class="result-wrap">
        <form name="myform" id="myform" method="post">
            <!--            <div class="result-title">-->
            <!--                <div class="result-list">-->
            <!--                    <a href="/addDynamic"><i class="icon-font"></i>添加工作动态</a>-->
            <!--                </div>-->
            <!--            </div>-->
            <div class="result-content">
                <table class="result-tab" width="100%" id="table" style="table-layout: fixed;">
                    <tr>
                        <!--                            <th>序号</th>-->
                        <th>任务</th>
                        <th>开始时间</th>
                        <th>截止时间</th>
                        <th>作业内容</th>
                        <th>操作</th>
                    </tr>

                    <tr th:each="item:${taskList}">
                        <td hidden id="getid" align="center" th:text="${item.getTask_id()}"></td>
                        <td align="center" th:text="${item.getTask_name()}"></td>
                        <td align="center" th:text="${item.getTask_sta_time()}"></td>
                        <td align="center" th:text="${item.getTask_end_time()}"></td>
                        <td align="center" th:utext="${item.getTask_content()}"></td>
                        <td align="center">
                            <a id="bianji" th:href='@{/task/toUpdateTask(id=${item.getTask_id()})}'>查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#" id="delete" th:onclick="'javascript:del('+${item.getTask_id()}+')' ">删除</a>
                        </td>
                    </tr>
                </table>
                <script>
                    function del(id) {
                        if (confirm("你确定要删除作业吗？")) {
                            window.location.href = "/task/deleteTask?id=" + id;
                        }
                    }
                </script>
                <!--                    <div class="list-page">-->
                <!--                        共有   条记录,当前  /   页-->
                <!--                        <a href="">首页</a>-->
                <!--                        <a href="">上一页</a>-->
                <!--                        <a href="">下一页</a>-->
                <!--                        <a href="">尾页</a>-->
                <!--                    </div>-->
            </div>
        </form>
    </div>
</div>

<!--</div>-->
</body>
</html>